Component({
  options: {
    multipleSlots: true // 在组件定义时的选项中启用多slot支持
  },
  properties: {
    popType: {
      type: Boolean,
      observer: function(newData,oldData){
        this.scale()
      }
    }
  },
  data: {},
  methods: {
    scale: function () {
      this.animation = wx.createAnimation({
        duration: 150
      })
      if (this.properties.popType) {
        this.scale1()
      } else {
        this.scale0()
      }
    },
    scale0: function () {
      this.animation.scale(0).step()
      this.setData({
        animation: this.animation.export()
      })
    },
    scale1: function () {
      this.animation.scale(1).step()
      this.setData({
        animation: this.animation.export()
      })
    }
  }
})